package org.kpy;

import com.alibaba.fastjson.JSONObject;

import java.io.*;
import java.net.Socket;
import java.nio.charset.StandardCharsets;

public class Client {
    public static void main(String[] args) throws IOException {
        Socket socket=new Socket("localhost",6666);
        //向服务器发送数据
        OutputStream out=socket.getOutputStream();
        out.write("hello server".getBytes(StandardCharsets.UTF_8));
        out.flush();
        socket.shutdownOutput();
        socket.close();
    }
}
